package com.xxxt.jxj.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xxxt.dao.CollegeMapper;
import com.xxxt.entity.College;
import com.xxxt.entity.Specialty;
import com.xxxt.jxj.service.CollegeService;
@Service
@Transactional
public class CollegeServiceImpl implements CollegeService {
	
	@Resource CollegeMapper collegeMapper;

	@Override
	public List<College> selcetAllCollegeBySchoolId(String schoolId) {
		// TODO Auto-generated method stub
		return collegeMapper.selcetAllCollegeBySchoolId(schoolId);
	}

	@Override
	public College selcetOneCollegeByCollegeId(String collegeId) {
		// TODO Auto-generated method stub
		return collegeMapper.selcetOneCollegeByCollegeId(collegeId);
	}

	@Override
	public boolean insertCollege(College college) {
		// TODO Auto-generated method stub
		return collegeMapper.insertCollege(college);
	}

	@Override
	public boolean deleteCollege(String collegeId) {
		// TODO Auto-generated method stub
		return collegeMapper.deleteCollege(collegeId);
	}

	@Override
	public boolean updateCollege(String collegeName, String schoolId, String id) {
		// TODO Auto-generated method stub
		return collegeMapper.updateCollege(collegeName, schoolId, id);
	}

	@Override
	public List<College> selcetAllCollege() {
		// TODO Auto-generated method stub
		return collegeMapper.selcetAllCollege();
	}

	@Override
	public List<College> selcetAllPageCollegeBySchoolId(String schoolId, int pageNum, int pageSize) {
		// TODO Auto-generated method stub
		return collegeMapper.selcetAllPageCollegeBySchoolId(schoolId);
	}

	@Override
	public List<Specialty> selectStudentByTnoAndSchool(List<College> colleges) {
		// TODO Auto-generated method stub
		return collegeMapper.selectStudentByTnoAndSchool(colleges);
	}

}
